package kino.common;

import org.springframework.stereotype.Component;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;

@Component
public class KinoContext {

    /**
     * 命令表加载同步器
     */
    public CountDownLatch commandLoading = new CountDownLatch(1);

    // 时间事件执行同步器
    public CountDownLatch timeEventLoading;

    public CountDownLatch getTimeEventLoading() {
        return timeEventLoading;
    }

    public void initTimeEventLoading(Integer size) {
        this.timeEventLoading = new CountDownLatch(size);
    }
}
